

<include file="Public/head"/><body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>
            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>

                <!-- /section:settings.box -->
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="cf">
                            <form class="form-inline" action="" method="get">
                                <a class="btn btn-info" href="{:U('add')}" value="">新增</a>
                                <label class="inline">所属分类</label>
                                <select name="class_id" class="form-control">
                                    <option value="0">--分类--</option>
                                    <foreach name="class_list" item="vo">
                                    <option value="{$vo.class_id}" <if condition="$search_class_id eq $vo[class_id]">selected</if>>--{$vo.class_name}--</option>
                                    </foreach>
                                </select>
								<label class="inline">特别分类</label>
                                <select name="other_class_id" class="form-control">
                                    <option value="0">--特别分类--</option>
                                    <foreach name="other_class_list" item="vo">
                                    <option value="{$vo.class_id}" <if condition="$search_other_class_id eq $vo[class_id]">selected</if>>--{$vo.class_name}--</option>
                                    </foreach>
                                </select>
								<label class="inline">小说来源</label>
                                <select name="from" class="form-control">
                                    <option value="0">--全部小说--</option>
                                    <option value="最爽小说" <if condition="$from eq '最爽小说'">selected</if>>--最爽小说--</option>
                                    <option value="同城群聊" <if condition="$from eq '同城群聊'">selected</if>>--同城群聊--</option>
                                </select>
								<label class="inline">是否完结</label>
                                <select name="is_end" class="form-control">
                                    <option value="-1">--选择--</option>
                                    <option value="1" <if condition="$search_is_end eq 1">selected</if>>--已完结--</option>
                                    <option value="0" <if condition="$search_is_end eq 0">selected</if>>--连载中--</option>
                                </select>
                                </select>
								<label class="inline">是否上架</label>
                                <select name="is_shelf" class="form-control">
                                    <option value="-1">--选择--</option>
                                    <option value="1" <if condition="is_shelf eq 1"></if>>--上架--</option>
                                    <option value="0" <if condition="is_shelf eq 0"></if>>--已下架--</option>
                                </select>
                                
                                <label class="inline">文章标题</label>
                                <input type="text" name="name" value="{$search_name}" class="form-control">
                                
                                <button type="submit" class="btn btn-purple btn-sm">
                                    <span class="ace-icon fa fa-search icon-on-right bigger-110"></span>搜索
                                </button>    
                            </form>
                            <form class="form-inline" action="/Qwadmin/Novel/updatenovel" method="get" target="_blank">
                                <button type="submit" class="btn btn-purple btn-sm">
                                    <span class="ace-icon fa fa-search icon-on-right bigger-110"></span>最爽小说更新(全部)
                                </button>
                            </form>
                            <form class="form-inline" action="/Qwadmin/Novel/updatenovel2" method="get" target="_blank">
                            	<label class="inline">登录信息</label>
                                <input type="text" name="cookie" value="" class="form-control">
                                <button type="submit" class="btn btn-purple btn-sm">
                                    <span class="ace-icon fa fa-search icon-on-right bigger-110"></span>同城群聊更新(全部)
                                </button>
                            </form>                            
                        </div>
                       
                        <div class="space-4"></div>
                        <form id="form" method="post" action="{:U('del')}">
                            <table class="table table-striped table-bordered">
                                <thead>
                                <tr>
                                    <th class="center"><input class="check-all" type="checkbox" value=""></th>
                                    <th class="col-xs-1">封面</th>
                                    <th>所属分类</th>
                                    <th class="col-xs-1">文章标题</th>
                                    <th>章节管理</th>
                                    <th>男生/女生</th>
                                    <th>是否热门</th>
                                    <th>是否完结</th>
                                    <th class="col-xs-1">主编推荐(越小越靠前)<a href="{:U("index",array("order_set"=>1,"p"=>1))}">排列</a></th>
                                    <th>是否上架</th>
                                    <th class="col-xs-1">首页轮播排序(升序)<a href="{:U("index",array("flow_set"=>1,"p"=>1))}">排列</a></th>
                                    <th class="col-xs-2">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                               
                                <volist name="list" id="val">
                                    <tr>
                                        <td class="center"><input class="aids" type="checkbox" name="id[]" value="{$val['id']}"></td>
                                        <td><img src= "{$val['img']}" style='width:80px' /></td>
                                        <td><a href="#" title="{$val['class_name']}">{$val['class_name']}</a></td>
                                        <td>{$val['name']}</td>
                                        <td><a href="{:U('chapter',array('id'=>$val['id']))}"><iclass="ace-icon fa fa-pencil bigger-100"></i>章节管理</a></td>
                                        <td>{$val['other_class_name']}</td>
                                        <td><if condition="$val['is_flag'] eq 1">热门<else />普通</if></td>
                                        <td><if condition="$val['is_end'] eq 1">完结<else />连载中</if></td>
                                        <td>{$val['order_set']}</td>
                                        <td><if condition="$val['is_shelf'] eq 1">上架<else />已下架</if></td>
                                        <td>{$val['flow_set']}</td>
                                        <td>
	                                        <a href="{:U('edit',array('id'=>$val['id']))}"><iclass="ace-icon fa fa-pencil bigger-100"></i>修改</a>
	                                        &nbsp&nbsp;
	                                        <a href="javascript:;" val="{:U('del',array('id'=>$val['id']))}" class="del"><i class="ace-icon fa fa-trash-o bigger-100 red"></i>删除</a>
	                                        &nbsp&nbsp;
	                                    		    
                                        </td>
                                    </tr>
                                </volist>
                                </tbody>
                            </table>
                        </form>
                        <div class="cf">
                            <input id="submit" class="btn btn-info" type="button" value="删除">
                        </div>
                        {$page}
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script type="text/javascript">
    $(function () {
        $(".check-all").click(function () {
            $(".aids").prop("checked", this.checked);
        });
        $(".aids").click(function () {
            var option = $(".ids");
            option.each(function (i) {
                if (!this.checked) {
                    $(".check-all").prop("checked", false);
                    return false;
                } else {
                    $(".check-all").prop("checked", true);
                }
            });
        });

        $("#submit").click(function () {
            bootbox.confirm({
                title: "系统提示",
                message: "是否要删除所选文章？",
                callback: function (result) {
                    if (result) {
                        $("#form").submit();
                    }
                },
                buttons: {
                    "cancel": {"label": "取消"},
                    "confirm": {
                        "label": "确定",
                        "className": "btn-danger"
                    }
                }
            });
        });
        $(".del").click(function () {
            var url = $(this).attr('val');
            bootbox.confirm({
                title: "系统提示",
                message: "是否要该文章？",
                callback: function (result) {
                    if (result) {
                        window.location.href = url;
                    }
                },
                buttons: {
                    "cancel": {"label": "取消"},
                    "confirm": {
                        "label": "确定",
                        "className": "btn-danger"
                    }
                }
            });
        });
    })
</script>
</body>
</html>
